<?php
/*************************************************

用户主模型 - the
Author: Reload <17-10-20>

*************************************************/
namespace Home\Model;
use Think\Model\RelationModel;
class UserInfoModel extends RelationModel {


    //查询单数据
    public function get_one($map){
        $data = $this->where($map)->find();
        return $data;
    }

    //更新
    public function edit($map,$data){
        $r = M('UserInfo')->where($map)->save($data);
        return $r;
    }

    //添加
    public function add($data){
        $data =M('UserInfo')->data($data)->add();
        return $data;
    }
    

}